﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using EuroManager.Domain.Simulator.Helpers;

namespace EuroManager.Domain.Simulator.Engine.Movements
{
    public class HitMovement : IMovement
    {
        private Vector2D location;
        private Vector2D velocity;

        public HitMovement(Vector2D location, Vector2D velocity)
        {
            this.location = location;
            this.velocity = velocity;
        }

        public bool IsFinished { get; private set; }

        public Vector2D Location
        {
            get { return location; }
        }

        public Vector2D Velocity
        {
            get { return velocity; }
        }

        public void Update(float elapsedTime)
        {
            location = Physics.Location(location, velocity, elapsedTime);
            IsFinished = true;
        }
    }
}
